package anjoyo.android.Sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class MySqlite extends SQLiteOpenHelper {

	public MySqlite(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}
	

	public MySqlite(Context context) {
		super(context,"FavoriteDB",null,1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "Create table Music(Id integer primarykey autoincreament , Name nvarchar(50) not null , Address nvarchar(50) not null)";
		String sql2 = "Create table SaveMusic(Id integer primarykey autoincreament , Name nvarchar(50) not null , Address nvarchar(50) not null)";
		db.execSQL(sql);
		db.execSQL(sql2);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		
	}
	
	
}
